<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>while循环</title>
</head>
<body>
</body>
</html>
<style>
    tr{
        height: 30px;
        text-align: center;
    }
    tr td{
        width: 60px;
    }
</style>
<script>
    //使用while循环生成表格信息
    function table(options = {}){
        let row = options.row;
        document.write('<table border="1" width="400">');
        while (row-- > 0) {
            let column = options.column;
            document.write('<tr>');
            while (column-- > 0) {
                document.write(`<td>${column}</td>`);
            }
            document.write('</tr>');
        }
        document.write('</table>');
    }

    table({row:50,column:50});
</script>